package com.lengxf.pay.ali.service;

import com.alipay.api.domain.AlipayTradeWapPayModel;
import com.alipay.api.request.AlipayTradeWapPayRequest;
import com.lengxf.pay.ali.config.ALI_PayConfig;
import com.lengxf.pay.common.bean.PayOrder;

public record AliWapPayService(ALI_PayConfig aliPayConfig) {


    public AlipayTradeWapPayRequest toPay(PayOrder payOrder) {
        AlipayTradeWapPayRequest request = new AlipayTradeWapPayRequest();
        AlipayTradeWapPayModel model = new AlipayTradeWapPayModel();
        model.setOutTradeNo(payOrder.getOrderNo());
        model.setTotalAmount(String.valueOf(payOrder.getPrice()));
        model.setSubject(payOrder.getProductDesc());
        model.setProductCode("QUICK_WAP_WAY");
//        model.setSellerId(aliPayConfig.getSellerId());
        request.setBizModel(model);
        return request;
    }

}
